<?php

/**
 * AlumnoVersion form base class.
 *
 * @method AlumnoVersion getObject() Returns the current form's model object
 *
 * @package    BecArTe
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseAlumnoVersionForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                   => new sfWidgetFormInputHidden(),
      'apellido'             => new sfWidgetFormInputText(),
      'nombre'               => new sfWidgetFormInputText(),
      'domicilio'            => new sfWidgetFormInputText(),
      'telefono'             => new sfWidgetFormInputText(),
      'celular'              => new sfWidgetFormInputText(),
      'email'                => new sfWidgetFormInputText(),
      'tipo_doc_id'          => new sfWidgetFormInputText(),
      'documento'            => new sfWidgetFormInputText(),
      'cuil'                 => new sfWidgetFormInputText(),
      'fecha_nacimiento'     => new sfWidgetFormDate(),
      'ciudad_actual_id'     => new sfWidgetFormInputText(),
      'ciudad_nacimiento_id' => new sfWidgetFormInputText(),
      'nacionalidad_id'      => new sfWidgetFormInputText(),
      'sede_id'              => new sfWidgetFormInputText(),
      'sf_guard_user_id'     => new sfWidgetFormInputText(),
      'created_at'           => new sfWidgetFormDateTime(),
      'updated_at'           => new sfWidgetFormDateTime(),
      'created_by'           => new sfWidgetFormInputText(),
      'updated_by'           => new sfWidgetFormInputText(),
      'version'              => new sfWidgetFormInputHidden(),
    ));

    $this->setValidators(array(
      'id'                   => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'apellido'             => new sfValidatorString(array('max_length' => 50)),
      'nombre'               => new sfValidatorString(array('max_length' => 50)),
      'domicilio'            => new sfValidatorString(array('max_length' => 50)),
      'telefono'             => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'celular'              => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'email'                => new sfValidatorString(array('max_length' => 50)),
      'tipo_doc_id'          => new sfValidatorInteger(array('required' => false)),
      'documento'            => new sfValidatorString(array('max_length' => 15)),
      'cuil'                 => new sfValidatorString(array('max_length' => 13)),
      'fecha_nacimiento'     => new sfValidatorDate(array('required' => false)),
      'ciudad_actual_id'     => new sfValidatorInteger(),
      'ciudad_nacimiento_id' => new sfValidatorInteger(),
      'nacionalidad_id'      => new sfValidatorInteger(),
      'sede_id'              => new sfValidatorInteger(array('required' => false)),
      'sf_guard_user_id'     => new sfValidatorInteger(),
      'created_at'           => new sfValidatorDateTime(),
      'updated_at'           => new sfValidatorDateTime(),
      'created_by'           => new sfValidatorInteger(array('required' => false)),
      'updated_by'           => new sfValidatorInteger(array('required' => false)),
      'version'              => new sfValidatorChoice(array('choices' => array($this->getObject()->get('version')), 'empty_value' => $this->getObject()->get('version'), 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('alumno_version[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'AlumnoVersion';
  }

}
